<%@ page import="java.util.HashMap,common.CommonUtil,java.util.*,common.*" contentType="text/html; charset=utf-8" %><%
UserSession userSession = (UserSession)session.getAttribute("user"); 

String login_id = null;
String user_id = null;

if(userSession!= null){
	login_id = userSession.getLogin_id();
	user_id = userSession.getUser_id();
}

String cmd 	= CommonUtil.nvl(request.getParameter("cmd"),"");
System.out.println("cmd ========> " + cmd);

HashMap listMap=(HashMap)request.getAttribute("list_map");

HashMap map  = null;
ArrayList list=null;


if (listMap!=null){
    list=(ArrayList)listMap.get("mainContent");
}

//System.out.println("list ========> " + list);

String return_msg = null;
String s_link_id = null;
String s_ent_alias = null;
String s_pay_code = null;
String in_member_test_code = null;

if(list != null){
	if(list.size() > 0){
		return_msg = (String)((HashMap)list.get(0)).get("return_msg");
		System.out.println("return_msg ========> " + return_msg);
		
		s_link_id = (String)((HashMap)list.get(0)).get("s_link_id");
		s_ent_alias = (String)((HashMap)list.get(0)).get("s_ent_alias");
		s_pay_code = (String)((HashMap)list.get(0)).get("s_pay_code");
		in_member_test_code = (String)((HashMap)list.get(0)).get("in_member_test_code");
	}
}

if(cmd.equals("preptest_rerating")){
System.out.println("연동 정보  pay_code => "+s_pay_code+" link_id=>"+s_link_id+" member_test_code=>"+in_member_test_code+" s_ent_alias=>"+s_ent_alias+" test_state=>9");	
%>
<!-- 대교 연동작업 -->
<jsp:include page="/jsp/testbridge.jsp">
<jsp:param name="pay_code" value="<%= s_pay_code%>" />
<jsp:param name="link_id" value="<%= s_link_id%>" />
<jsp:param name="member_test_code" value="<%= in_member_test_code%>" />
<jsp:param name="test_state" value="9" />
<jsp:param name="ent_alias" value="<%= s_ent_alias%>" />
</jsp:include>
<%
} 
if(cmd.equals("preptest_modify")){
	System.out.println("연동 정보  pay_code => "+s_pay_code+" link_id=>"+s_link_id+" member_test_code=>"+in_member_test_code+" rating_state=>2 test_state=>2");	
%>
	<!-- 대교 연동작업 -->
	<jsp:include page="/jsp/testbridge.jsp">
	<jsp:param name="pay_code" value="<%= s_pay_code%>" />
	<jsp:param name="link_id" value="<%= s_link_id%>" />
	<jsp:param name="member_test_code" value="<%= in_member_test_code%>" />
	<jsp:param name="test_state" value="2" />
	<jsp:param name="rating_state" value="2" />
	<jsp:param name="ent_alias" value="<%= s_ent_alias%>" />
	</jsp:include>
<%} %>

<script>

<%if(return_msg.equals("insert_TRUE")){%>
alert('입력되었습니다.');
parent.go_preptest();
<%}%>

<%if(return_msg.equals("delete_TRUE")){%>
alert('삭제되었습니다.');
parent.go_preptest();
<%}%>

<%if(return_msg.equals("modify_TRUE")){%>
alert('정상적으로 처리가 되었습니다.');
parent.go_preptest();
<%}%>

<%if(return_msg.equals("rating_end")){%>
alert("이미 채점이 완료 된 것입니다.");
<%}%>
</script>
